Skip to content

Hosting integration for Zitadel#1100

Open
dealloc wants to merge 14 commits intoCommunityToolkit:mainfrom
dealloc:feature/zitadel
Open

Hosting integration for Zitadel#1100
dealloc wants to merge 14 commits intoCommunityToolkit:mainfrom
dealloc:feature/zitadel

Conversation

@dealloc
Copy link

@dealloc dealloc commented Jan 15, 2026

**Closes #1015 **

This PR is a continuation of the previous PR for Zitadel support: #1021

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

@aaronpowell
Copy link
Member

I'm seeing failures in the test log starting here: https://github.com/CommunityToolkit/Aspire/actions/runs/21052154522/job/60540747581?pr=1100#step:6:497

The tests themselves don't seem to report failing, so possibly the Assert isn't capturing the stack properly.

Do the test pass locally?

@dealloc
Copy link
Author

dealloc commented Jan 16, 2026

@aaronpowell the problem seems to happen when GetEnvironmentVariablesAsync is called and the tests just 'hang'

@github-actions github-actions bot added the Stale label Jan 22, 2026
@github-actions github-actions bot closed this Jan 25, 2026
@dealloc
Copy link
Author

dealloc commented Jan 25, 2026

I don't mind continuing to work on this, I just need input on why GetEnvironmentVariablesAsync causes the tests to hang.
From what I can tell it's whenever a Postgres integration is also in play

@aaronpowell aaronpowell reopened this Feb 2, 2026
@aaronpowell aaronpowell removed the Stale label Feb 2, 2026
@dealloc
Copy link
Author

dealloc commented Feb 3, 2026

@aaronpowell any input on the GetEnvironmentVariablesAsync?

This avoids a deadlock when the resource is trying to resolve the endpoint before it has been fully configured by Aspire
@aaronpowell
Copy link
Member

@dealloc sorry, been under the pump with some other stuff recently. I've just pushed a commit which fixes the timeout issue. I think some of the asserts are now failing though

@dealloc
Copy link
Author

dealloc commented Feb 6, 2026

no worries, just wanted to make sure this PR didn't slip under the radar :)
One of the failing asserts is Assert.Equal("false", env["ZITADEL_TLS_ENABLED"]);

it seems that WithHttpsCertificateConfiguration didn't run yet as I set those vars in the callback.

    [Fact]
    public async Task AddZitadel_Sets_Default_Environment_Variables()
    {
        var builder = DistributedApplication.CreateBuilder();

        var zitadel = builder.AddZitadel("zitadel");

        var env = await zitadel.Resource.GetEnvironmentVariablesAsync();

        Assert.Equal("false", env["ZITADEL_TLS_ENABLED"]);
        Assert.Equal("false", env["ZITADEL_EXTERNALSECURE"]);
        Assert.Equal("zitadel.dev.localhost", env["ZITADEL_EXTERNALDOMAIN"]);
        Assert.Equal("false", env["ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED"]);
        Assert.Equal("false", env["ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORDCHANGEREQUIRED"]);
    }

I suspect I need to do something so Aspire actually calls the callback for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hosting integration for Zitadel

2 participants